package day08.Regex_practice;
/*
正则表达式
 */
import java.util.Scanner;

public class Test1 {
    public static void main(String[] args) {
        System.out.println("身份证号:");
        String s= new Scanner(System.in).nextLine();
        String regex = "\\d{15}|\\d{17}[\\dxX]";
        if(s.matches(regex)){
            System.out.println("格式正确");
        }else{
            System.out.println("格式错误");
        }
    }
}
